package org.chuan.hisports.dao;

import org.apache.ibatis.annotations.Param;
import org.chuan.hisports.entity.User;

import java.util.List;

public interface UserDao {
    public List<User> test();
    public int register(User user);
    public User login(@Param(value="phone") String phone,
                      @Param(value="password") String password);
    //根据id查询相应的用户信息
    public User selectById(@Param(value = "id") String id);
    public String checkPhoneExist(@Param(value = "phone") String phone);
    public String checkPassword(@Param(value = "phone") String phone);
    //修改用户名，手机号，密码，头像等
    public int modifyPassword(@Param(value = "phone") String phone,
                                 @Param(value = "password") String password);
    public void modifyNickname(@Param(value="id") String id,
                                 @Param(value = "nickname") String nickname);
    public void modifyAvatar(@Param(value = "id") String id,
                                @Param(value = "avatar") String avatar);
}
